home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / cm100exe.zip / CM100EXE.EXE / SAMPLES / C / MAKEFILE < prev    next >
Text File  |  1991-11-16  |  4KB  |  110 lines

  1. /*****************************************************************************
  2. *                              MAKEFILE
  3. *
  4. *  PURPOSE: Build the following modules:
  5. *
  6. *           "hello.obj"
  7. *           "world.obj"
  8. *           "message.lib"
  9. *           "greeting.obj"
  10. *           "greeting.exe"
  11. *
  12. *  NOTE: None of the comments in this make file are required.  They have
  13. *        been provided to help you understand how CMAKE handles each
  14. *        command.  In other words, this make file could be reduced down to
  15. *        the following five commands:
  16. *
  17. *        cl /c /W4 hello.c
  18. *        cl /c /W4 world.c
  19. *        lib @message.lrf
  20. *        cl /c /W4 greeting.c
  21. *        link @greeting.lnk
  22. *
  23. *****************************************************************************/
  24.  
  25. /*****************************************************************************
  26. *                              HELLO.OBJ
  27. *
  28. *  The following CL command will be executed only when one of the
  29. *  following conditions is true:
  30. *
  31. *  1. "hello.obj" does not exist.
  32. *  2. "hello.c" is newer than "hello.obj".
  33. *  3. "hello.h" is newer than "hello.obj".
  34. *
  35. *****************************************************************************/
  36.  
  37. cl /c /W4 hello.c
  38.  
  39. /*****************************************************************************
  40. *                               WORLD.OBJ
  41. *
  42. *  The following CL command will be executed only when one of the
  43. *  following conditions is true:
  44. *
  45. *  1. "world.obj" does not exist.
  46. *  2. "world.c" is newer than "world.obj".
  47. *  3. "world.h" is newer than "world.obj".
  48. *
  49. *****************************************************************************/
  50.  
  51. cl /c /W4 world.c
  52.  
  53. /*****************************************************************************
  54. *                              MESSAGE.LIB
  55. *
  56. *  The following LIB command will be executed only when one of the
  57. *  following conditions is true:
  58. *
  59. *  1. "message.lib" does not exist.
  60. *  2. "hello.obj" is newer than "message.lib".
  61. *  3. "world.obj" is newer than "message.lib".
  62. *
  63. *  Actually, only those objects that are newer than the library,
  64. *  "message.lib", will be added to the library.  For example, suppose
  65. *  "message.lib" exists, "hello.obj" is newer than "message.lib", and
  66. *  "world.obj" is older than "message.lib".  In this case, only
  67. *  "hello.obj" must be added to the library, "message.lib".  Thus, in
  68. *  this case, CMAKE would execute the following command:
  69. *
  70. *  lib @message.clb
  71. *
  72. *  where "message.clb" consists of the following lines:
  73. *
  74. *  message.lib
  75. *  -+hello.obj ;
  76. *
  77. *****************************************************************************/
  78.  
  79. lib @message.lrf
  80.  
  81. /*****************************************************************************
  82. *                           GREETING.OBJ
  83. *
  84. *  The following CL command will be executed only when one of the
  85. *  following conditions is true:
  86. *
  87. *  1. "greeting.obj" does not exist.
  88. *  2. "greeting.c" is newer than "greeting.obj".
  89. *  3. "hello.h" is newer than "greeting.obj".
  90. *  4. "world.h" is newer than "greeting.obj".
  91. *  5. "greeting.h" is newer than "greeting.obj".
  92. *
  93. *****************************************************************************/
  94.  
  95. cl /c /W4 greeting.c
  96.  
  97. /*****************************************************************************
  98. *                           GREETING.EXE
  99. *
  100. *  The following LINK command will be executed only when one of the
  101. *  following conditions is true:
  102. *
  103. *  1. "greeting.exe" does not exist.
  104. *  2. "greeting.obj" is newer than "greeting.exe".
  105. *  3. "message.lib" is newer than "greeting.exe".
  106. *
  107. *****************************************************************************/
  108.  
  109. link @greeting.lnk
  110.